package com.maybach.core.manager;

import com.maybach.util.query.support.PageResult;
import com.maybach.common.model.PartnerDO;
import com.maybach.common.query.PartnerQuery;

import java.sql.SQLException;
import java.util.List;


/**
 * Manager for Partner.
 */
public interface PartnerManager {
    /**
     * query count by query condition.
     */
    int countByQuery(PartnerQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(PartnerQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(PartnerDO record);

    /**
     * insert selective.
     */
    long insertSelective(PartnerDO record);

    /**
     * select by query condition.
     */
    List<PartnerDO> selectByQuery(PartnerQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<PartnerDO> selectByQueryWithPage(PartnerQuery query);

    /**
     * select by primary key.
     */
    PartnerDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( PartnerDO record,  PartnerQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(PartnerDO record, PartnerQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(PartnerDO record);

    int countPartnerByCertificateCodeDao(String certificateCode) throws SQLException;
}